/**
 * Copyright (c) 2018-2022, NXOS Development Team
 * SPDX-License-Identifier: Apache-2.0
 *
 * Contains: aarch64 virtualization support
 *
 * Change Logs:
 * Date           Author            Notes
 * 2024-4-18      plancj            init
 */

#include <base/types.h>
#include <base/defines.h>
#include <virt/virt.h>
#include <arch/sysregs.h>
 
void NX_VirtInit(void)
{
    NX_Addr reg = read_sysreg(hcr_el2);
    reg |= HCR_HOST_NVHE_FLAGS;
    write_sysreg(reg,hcr_el2);
}